package cn.b.sky.flowable.dao;

import cn.b.sky.flowable.model.WaitTask;
import cn.b.sky.flowable.model.condition.WaitTaskCondition;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface WaitTaskDao {
  
  public List<WaitTask> selectWaitingTaskByCondition(WaitTaskCondition page);
  
  public int selectWaitingTaskCountByCondition(WaitTaskCondition waitTask);
  
  public List<WaitTask> selectWaitTaskByCondition(WaitTaskCondition waitTask);

  public int selectWaitTaskCountByCondition(WaitTaskCondition waitTask);

  public List<WaitTask> selectProcessInstanceByCondition(WaitTaskCondition waitTask);

  public int selectProcessInstanceCountByCondition(WaitTaskCondition waitTask);

  public WaitTask selectWaitTaskByTaskIdAndTenantId(@Param("taskId") String taskId, @Param("tenantId") String tenantId);

  public void insertWaitTask(WaitTask waitTask);

  public void updateWaitTask(WaitTask waitTask);

  public WaitTask selectStarWaitTask(@Param("tenantId") String tenantId,
                                     @Param("processInstanceId") String processInstanceId, @Param("startprocess") String startprocess);

}
